package models

import "gorm.io/gorm"

type Product struct {
	gorm.Model
	ProductName    string  `gorm:"type:varchar(30)"`
	ProductPrice   float64 `gorm:"type:decimal(10,2)"`
	ProductNumber  string  `gorm:"type:varchar(30)"`
	ProductAddress string  `gorm:"type:varchar(200)"`
}

func (p *Product) ProductAdd(db *gorm.DB) error {
	return db.Debug().Create(&p).Error
}
